package com.xmg.mgrsite.base;

import com.xmg.p2p.base.query.RealAuthQO;
import com.xmg.p2p.base.service.IRealAuthService;
import com.xmg.p2p.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class RealAuthMGRController {
    @Autowired
    private IRealAuthService realAuthService;
    @RequestMapping("realAuth")
    public String query(@ModelAttribute("qo") RealAuthQO qo, Model model){
        model.addAttribute("pageResult",realAuthService.query(qo));
        return "realAuth/list";
    }
    @RequestMapping("realAuth_audit")
    @ResponseBody
    public JSONResult audit(Long id,String remark,int state){
        realAuthService.audit(id,remark,state);
        return new JSONResult();
    }
}
